package com.liuc.practice.ipersistent.sqlSession;


import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * 该接口用于去执行查询
 *
 * @Author Liu Chang
 * @Date 2020/12/13 6:50 上午
 */
public interface SqlSession {

    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    <E> E selectOne(String statementId, Object... params) throws Exception;

    public void insert(String statementId, Object... entity) throws Exception;

    public void update(String statementId, Object... entity) throws Exception;

    public void delete(String statementId, Object... entity) throws Exception;

    /**
     * 返回的是代理对象
     * @param clazz
     * @param <E>
     * @return
     */
    public <E> E getMapper(Class<?> clazz);
}
